import json
import os
import configparser
import requests
class tongji(object):
    def __init__(self):
        self.headers = {
            'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36',
            'Referer': 'https://www.sinochemlogistics.com/home/login',
            'Host': 'www.sinochemlogistics.com'
        }
        self.login_url = 'https://www.sinochemlogistics.com/api2/user/signin'
        self.login_session = requests.Session()

    ##切换容器
    def switch_ent(self, switch_url):
        res = self.login_session.get(switch_url, headers=self.headers)
        if res.status_code == 200:
            return "switch_ent OK"
        return "switch_ent Error"